package com.dsjy.yf.address.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsjy.yf.address.entity.dataobject.YardDO;

import java.util.List;

/**
 * @author whj
 * @version 1.0
 * @date 2021-01-20 9:09
 */
public interface YardService{

    /**
     * 根据id查找院落所有信息
     *
     * @param id
     * @return
     */
    YardDO searchYardWithId(Integer id);

    /**
     * 根据区划代码查找院落所有信息
     *
     * @param parentCode
     * @return
     */
    List<YardDO> searchYardWithCode(Integer parentCode, Boolean flag);

    /**
     * 增删改
     *
     * @param operate
     * @param yardDO
     * @return
     */
    Integer addUpdDel(String operate, YardDO yardDO);

    /**
     * 更新
     *
     * @param yardDO
     * @return
     */
    Integer updateYard(YardDO yardDO);

    /**
     * 增加院落
     *
     * @param yardDO
     * @return
     */
    Integer addYard(YardDO yardDO);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    Integer delYard(Integer id);

    /**
     * 分页查询
     * @param pageNum
     * @param pageSize
     * @param wrapper
     * @return
     */
    IPage searchWithPage(Integer pageNum, Integer pageSize, QueryWrapper wrapper);
}
